package com.zhanghe.study.spring4.beans.aoptest;

import com.zhanghe.study.spring4.beans.aoptest.cglib.MyServiceBiz;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zh
 * @date 2021/1/6 11:03
 */
public class AopXmlMain {
//    public static void main(String[] args) {
//        ApplicationContext context = new ClassPathXmlApplicationContext("aop-xml.xml");
//        MyInterface myInterface = (MyInterface) context.getBean("myInterface");
//        myInterface.log("hello");
//    }

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("aop-xml.xml");
        MyServiceBiz myServiceBiz = context.getBean(MyServiceBiz.class);
        myServiceBiz.log("hello");
    }
}
